package work1.work7;


import java.io.*;
import java.util.HashMap;
import java.util.Iterator;

public class Test1 {
    public static void main(String[] args) {
        HashMap<Integer,String> Map = new HashMap<Integer, String>() ;
        Map.put(1,"可循还");
        Map.put(2,"不可循还");
        Map.put(3,"德玛");
        Map.put(4,"西亚");
        OutputStream out = null;
        BufferedOutputStream bos = null;
        try {
            out = new FileOutputStream("pan.txt");
            bos = new BufferedOutputStream(out);

                String s = ("Key = " + Map.keySet() + ", Value = " + Map.values());
                byte[] b=s.getBytes();
                bos.write(b);
                bos.flush();

        } catch (Exception e) {
            e.printStackTrace();
        }finally {
            try {
                bos.close();
                out.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }


    }
}
